<?php 
$webroot="../";
if(session::is_manager()==TRUE)
{
	require_once '../html/admintemplate.php';
}
?>
<script type="text/javascript" src="../html/jquery.js"></script>
<script type="text/javascript" >
function viewreport()
{
	$("#freshcvvreport").html("<img src='../images/loading.gif' />");
	$.ajax({
		url: "report.php" ,
		type:'get',
		data:"year="+$("#year").val()+"&month="+$("#month").val()+"&day="+$("#day").val(),
		cache: false,
		success: function(j){
		$("#freshcvvreport").html(j);
	  	}
	  	
	});	
}

</script>
<?php
session::need_manage();
$Year=date("Y");
$Month=date("m");
$Day=date("d");
?>
<center>
<table>
<tr class="classtopmenu">
<td>
Năm<select name="year" id="year">
<option value="2011" >2011</option>
</select>
</td>
<td>
Tháng
<select name="month" id="month">
<option value="" >Chọn Tháng</option>
<?php 
for($idmonth=$Month;$idmonth>0;$idmonth--)
{
	echo "<option value=$idmonth >$idmonth</option>";
}
?>
</select>
</td>
<td>
Ngày
<select name="day" id="day">
<option value="" >Chọn Ngày</option>
<?php 
for($idday=$Day;$idday>0;$idday--)
{
	echo "<option value=$idday >$idday</option>";
}
?>
</select>
</td>
<td>
<input name="submit" type="submit" onclick="javascript:viewreport();" />
</td>
</tr>
</table>
</center>
<div id="freshcvvreport" ></div>
<?php 
?>